-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Title is not copied correctly when duplicating navigation #53610
Conversation
Size Change: -2 B (0%) Total Size: 1.5 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this fix 🙇
I tested this and
- verified the original problem on
trunk
- verified this PR fixes that problem
What I'd like to understand (maybe from @jeryj) is why this happens? I thought we'd resolved all of this missing sub properties stuff previously?
I understand as follows.
In other words, of the areas refactored in #52807, the direct use of the value of the I have looked again at why this difference occurs, and this series of comments seems to be right on target.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Follow-up on #52807
What?
This PR fixes a problem with the title being converted to the unintended string
[object object]
when the navigation menu is duplicated.Why?
The navigation object passed to the copy handler is obtained via
useEntityRecord()
.gutenberg/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js
Lines 29 to 33 in 4f4f8e5
I don't fully understand, but the
title
property should be an object withraw
andrendered
properties, not a string.How?
Reverted to the previous implementation of checking the
rendered
property.Testing Instructions
{Navigation Name} (copy)
.